module.exports = function (Mock) {
    Mock.mock(/\/api\/home/, 'post', ({
        body
    }) => {
        // console.log(3,JSON.parse(body).token)
        const data = Mock.mock({
            nav: [{
                    title: "首页",
                    textList: ["Lorem ipsum dolor"],
                    routerPush: 'Home'
                },
                {
                    title: "工作台",
                    routerPush: 'Work',
                    secondTitle: [{
                        pathName: "toDoList",
                        text: '今日待办'
                    }, {
                        pathName: "Article",
                        text: 'Maecenas dignissim fermentum luctus'
                    }],
                },
                {
                    title: "博客",
                    secondTitle: [{
                        pathName: "",
                        text: '今日待办'
                    }, {
                        pathName: "",
                        text: 'Maecenas dignissim fermentum luctus'
                    }],
                },
                {
                    title: "随笔",
                    secondTitle: [{
                        pathName: "",
                        text: '今日待办'
                    }, {
                        pathName: "",
                        text: 'Maecenas dignissim fermentum luctus'
                    }],
                },
            ],
            // 属性 list 的值是一个数组，其中含有 1 到 10 个元素
            "articleList|1-20": [{
                title: '博客时代',
                text: '开始创建属于自己的博客把',
                'id|+1': 1
            }]
        })
        return {
            data,
            status: 'scssess',
            msg: "请求成功"
        }
    })
    // queryDetail
    Mock.mock(/\/api\/queryDetail/, 'post', (({
        body
    }) => {
        console.log(body);
        const id = JSON.parse(body).id
        const data = Mock.mock({
            title: '文章标题' + id
        })
        return {
            data,
            status: 'scssess',
            msg: "请求成功"
        }
    }))
}



// export default (app) => {

// }